<!DOCTYPE html>
<html>
<head>
<title>index.html</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="zj_validate/zj_validate.css" />
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="zj_validate/zj_validate.js"></script>
<script type="text/javascript">
	$(function() {
		var result = $("#form").zjvali({
			successTag : '<div class="tip-success">',
			failTag : '<div class="tip-error">',
			itemSuccessFun : function() {
				$(this).closest('div').removeClass('error').addClass('success');
			},
			itemFailFun : function() {
				$(this).closest('div').removeClass('success').addClass('error');
			},
			submitFailFun : function() {
				alert("验证不通过");
			}
		});
	})
</script>
</head>

<body>
	<form action="" method="post" id="form">
		<div>
			邮箱：
			<input type="text" name="name" vali-config="{'required':'required','valitype':'email','remote':'http://localhost/user/exitEmail','parKey':'email','targetId':'name_tip'}" />
			<span id="name_tip"></span>
		</div>
		<br />
		<input type="submit" value="提交" />
	</form>
</body>
</html>
